import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const orderRefund = 'order_refund_detail'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getRowsByRefundDetail() {
  const cookieValue = Cookies.get(orderRefund);
  return cookieValue ? JSON.parse(cookieValue) : null;
}


export function setRowsByRefundDetail(row) {
  return Cookies.set(orderRefund, JSON.stringify(row))
}
